Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: new composable api #146

Merged
merged 3 commits into from
Nov 1, 2021
Merged

feat: new composable api #146

merged 3 commits into from
Nov 1, 2021

Conversation

aidenybai
Copy link
Owner

@aidenybai aidenybai commented Oct 30, 2021

Please describe the changes this PR makes and why it should be merged:

New API:

const patch = (
  el,
  newVNode,
  oldVNode,
  workStack = [],
): DOMNode => {
  const composeDriver = compose([
	blockFormatDriver([
		exampleOptionalDriver1(insideDriver()),
		exampleOptionalDriver2()
	]), 
	childrenDriver(),
	propsDriver()
  ]);
  const data = composeDriver(el, newVNode, oldVNode, workStack);
  flushWorkStack(data.workStack);
  return data.el;
};

Technically the compose "driver" is also swappable for your own driver as well

Status

  • Code changes have been tested against prettier, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

Semantic versioning classification:

  • This PR changes the codebase
    • This PR includes breaking changes (methods removed or renamed, parameters moved or removed)
    • This PR changes the internal workings with no modifications to the external API (bug fixes, performance improvements)
  • This PR only includes non-code changes, like changes to documentation, README, etc.

@coveralls
Copy link

coveralls commented Oct 30, 2021

Pull Request Test Coverage Report for Build 1401785449

  • 16 of 16 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.8%) to 90.769%

Totals Coverage Status
Change from base Build 1395807364: -0.8%
Covered Lines: 94
Relevant Lines: 94

💛 - Coveralls

@aidenybai aidenybai merged commit 921d240 into main Nov 1, 2021
@aidenybai aidenybai deleted the composable-api branch November 1, 2021 15:15
@coveralls
Copy link

coveralls commented Nov 18, 2024

Pull Request Test Coverage Report for Build 1401657141

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 3 of 3 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+6.4%) to 98.02%

Totals Coverage Status
Change from base Build 1395807364: 6.4%
Covered Lines: 67
Relevant Lines: 67

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants